<?php
require("../../class/connect.php");
require("../../class/db_sql.php");
require("../../class/q_functions.php");
require("../../class/user.php");
require("../../data/dbcache/MemberLevel.php");
$link=db_connect();
$empire=new mysqlquery();
$editor=1;
//$uid= intval(getcvar('mluserid'));
$uid=$_REQUEST['uid'];
if($is_my){
	$app_uids=getMyFocusUids($uid);
}else{
	$app_uids=$uid;
}
$type_id=$_REQUEST["type_id"];
$d=getUserOnLineList($app_uids,$type_id);
if($d){
	foreach($d as $k=>$v){		
		if($v['type_id']==SAY_TYPE_ID){
			$d=$v['data'];			
			$thisUid=$v['uid'];
			$ui=getUserInfo($thisUid);			
			if($d[0]){$d=$d[count($d)-1];}
?>
<li>

               <div class="image"><a href="../sp/?uid=<?=$thisUid?>"><img src="<?=getUserHead($ui['userpic'],69,69)?>" alt="" title=""></a></div>
               <div class="info">
                <p><a href="../sp/?uid=<?=$v[uid]?>"><?=$ui['nickname']?></a>发布了直播： <?=$d['title']?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?=qtime($v['update_time'])?></p>
				 <p style="text-align:right;"><a href="../sp/?uid=<?=$v[uid]?>">查看</a></p>
                 <p style='display:none;'><a href="#">评论</a><a href="#">查看他的全部直播</a></p>
				 <p style='display:none;'><textarea  value='' id=''style='width:200px;height:20px;'></textarea><input type='button' value='评论'/></p>
                </div>
                <div class="clear"></div>
    </li>
<?php
		}else if($v['type_id']==SET_TAGS_ID)  {
					$d=$v['data'];					
				   $ui=getUserInfo($v['uid']);
				   ?>
<li>

               <div class="image"><a href="../sp/?uid=<?=$v[uid]?>"><img src="<?=getUserHead($ui['userpic'],69,69)?>" alt="" title=""></a></div>
               <div class="info">
                <p><a href="../sp/?uid=<?=$v[uid]?>"><?=$ui['nickname']?></a>修改了标签：</p> 
				<?php 
					$index=0;   
					foreach($v['data'] as $k_c => $v_c){
						if($index++>2){
							break;
						}
						?>
					<p><?=$v_c['tags']?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?=qtime($v['update_time'])?></p>
				<?php }?>
                 <p style="text-align:right;"><a href="../sp/?uid=<?=$v[uid]?>">查看</a></p>
				 <p style='display:none;'><textarea  value='' id=''style='width:200px;height:20px;'></textarea><input type='button' value='评论'/></p>
                </div>
                <div class="clear"></div>
    </li>

		<?php }elseif($v['type_id']==CHG_HEAD_ID){			
			$d=$v['data'];			
			//print_r($v);
			$thisUid=$v['uid'];
			$ui=getUserInfo($thisUid);
			$head=getUserHead($ui['userpic'],69,69);			
			?>
<li>

               <div class="image"><a href="../sp/?uid=<?=$v[uid]?>"><img src="<?=$head?>" alt="" title=""></a></div>
               <div class="info">
                <p><a href="../sp/?uid=<?=$v[uid]?>"><?=$ui['nickname']?></a>修改了头像：</p> 
			
					<p><a href="../sp/?uid=<?=$v[uid]?>"><img src="<?=$head?>"  height='50'/></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?=qtime($v['update_time'])?></p>				
                 <p style="text-align:right;"><a href="../sp/?uid=<?=$v[uid]?>">查看</a></p>
				 <p style='display:none;'><textarea  value='' id=''style='width:200px;height:20px;'></textarea><input type='button' value='评论'/></p>
                </div>
                <div class="clear"></div>
    </li>
		<?php }elseif($v['type_id']==JOIN_TRIBE_ID){			
			$d=$v['data'];			
			//print_r($d);
			$thisUid=$v['uid'];
			$ui=getUserInfo($thisUid);
			$head=getUserHead($ui['userpic'],69,69);			
			?>
<li>

               <div class="image"><a href="../sp/?uid=<?=$v[uid]?>"><img src="<?=$head?>" alt="" title=""></a></div>
               <div class="info">
                <p><a href="../sp/?uid=<?=$v[uid]?>"><?=$ui['nickname']?></a>关注了活动：<a href='<?=$public_r['newsurl']?>tribe/detail/?id=<?=$v['sub_type']?>'><?=$d['title']?></a></p> 
			
					<p><a href="<?=$public_r['newsurl']?>tribe/detail/?id=<?=$v['sub_type']?>" style='margin-left:60px;'><img height='50' src='<?php 
						if(empty($d['cover_url'])){
							echo $public_r['newsurl'].'images/img01.jpg';
						}else{
							echo $public_r['newsurl'].$d['cover_url'];
						}?>'/></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?=qtime($v['update_time'])?></p>				
                 <p style="text-align:right;"><a href="<?=$public_r['newsurl']?>tribe/detail/?id=<?=$v['sub_type']?>">查看</a></p>
				 <p style='display:none;'><textarea  value='' id=''style='width:200px;height:20px;'></textarea><input type='button' value='评论'/></p>
                </div>
                <div class="clear"></div>
    </li>
	<?php }elseif($v['type_id']==ADD_FOCUS_ID){			
			$d=$v['data'];			
			//print_r($d);
			$thisUid=$v['uid'];
			$ui=getUserInfo($thisUid);
			$head=getUserHead($ui['userpic'],69,69);
			//print_r($d);
			$TUI=getUserInfo($d['t_uid']);
			$Thead=getUserHead($TUI['userpic'],69,69);			
			?>
<li>

               <div class="image"><a href="../sp/?uid=<?=$v[uid]?>"><img src="<?=$head?>" alt="" title=""></a></div>
               <div class="info">
                <p><a href="../sp/?uid=<?=$v[uid]?>"><?=$ui['nickname']?></a>关注了：<a href='../sp/?uid=<?=$TUI['userid']?>'><img src='<?=$Thead?>' height='50'/><?=$TUI['nickname']?></a></p> 
			
					<p><a href="../sp/?uid=?id=<?=$v['sub_type']?>" style='margin-left:60px;'></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?=qtime($v['update_time'])?></p>				
                 <p style="text-align:right;"><a href="../sp/?uid=<?=$v['sub_type']?>">查看</a></p>
				 <p style='display:none;'><textarea  value='' id=''style='width:200px;height:20px;'></textarea><input type='button' value='评论'/></p>
                </div>
                <div class="clear"></div>
    </li>
		<?
			}
			   }
}else{
?>
<div class='no-data'>暂无数据！</div>
<?php }?>